define(function () {
  "use strict";
  return function getCookie(key) {
    const str = document.cookie;
    const arr = str.split("; ");
    for (let i = 0; i < arr.length; i++) {
      if (arr[i].split("=")[0] === key) {
        return arr[i].split("=")[1];
      }
    }
  }
});
